import Vue from 'vue';
import VueRouter from '../vueRouter/index'

Vue.use(VueRouter)

const routes = [
    {
        name: 'home',
        path: '/',
        component: () => import(/* webpackChunkName: 'home' */ '../view/home') 
    },
    {
        name: 'detail',
        path: '/detail',
        component: () => import(/* webpackChunkName: 'detail' */ '../view/index')
    }
]

const router = new VueRouter({
    routes
})

export default router